USE MASTER
GO
SP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE
GO
UPDATE SYSDATABASES SET STATUS =32768 WHERE NAME='work'
Go
sp_dboption 'work', 'single user', 'true'
Go
DBCC CHECKDB('work') 
Go
update sysdatabases set status =28 where name='work'
Go
sp_configure 'allow updates', 0 reconfigure with override
Go
sp_dboption 'work', 'single user', 'false'
Go